<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page"%>

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"  %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"  %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"  %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"  %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>JAVA CAFE V2</title>
	
	<link rel="stylesheet" type="text/css" href="/css/layout.css">

	<!-- Menu Selection -->
	<script src="/scripts/custom/common/MenuSelectionManager.js"></script>
	
	<!-- JQuery -->
	<link rel="stylesheet" href="/scripts/jquery-ui/themes/base/jquery.ui.all.css">
	<script src="/scripts/jquery/jquery-1.5.2.min.js"></script>
	
	<script type="text/javascript">
		$(function() {
			// 선택된 메뉴 활성화
			fnSiteMenuOn("${FIRST_URI}", "${SECOND_URI}", "${THIRD_URI}", "${FOURTH_URI}");
		});
	</script>
		
	<decorator:head />
</head>
<body>


<div id="wrap">

	<!-- header -->
	<%@ include file="page/top.jsp" %>
	<!-- //header -->
		
		
		
	<!-- container -->
	<table cellspacing="0" id="container">
	
	<c:choose>
		<c:when test="${!empty SCROLL_PREVIEW}">
		
			<!-- ================================================ -->
			<!-- 메인 페이지 -->
			<!-- ================================================ -->
			<tr>
				<td>
					<%@ include file="page/scroll_preview.jsp" %>
				</td>
			</tr>
			<tr>
				<td>
					<!-- body -->		
					<decorator:body/>			
				</td>
			</tr>
		
		</c:when>
		<c:otherwise>
		
			<!-- ================================================ -->
			<!-- 서브 페이지 -->
			<!-- ================================================ -->
			<tr>
				<!-- sub menu -->
				<td class="snb">
					<c:choose>
						<c:when test="${FIRST_URI=='intro'}">
							<%@ include file="page/left_intro.jsp" %>
						</c:when>
						<c:when test="${FIRST_URI=='community'}">
							<%@ include file="page/left_community.jsp" %>
						</c:when>
						<c:when test="${FIRST_URI=='member'}">
							<%@ include file="page/left_member.jsp" %>
						</c:when>
						<c:when test="${FIRST_URI=='manage'}">
							<%@ include file="page/left_manage.jsp" %>
						</c:when>
						<c:when test="${FIRST_URI=='board'}">
							<c:choose>
								<c:when test="${FOURTH_URI=='NTC_001'}">
									<%@ include file="page/left_notice.jsp" %>
								</c:when>
								<c:when test="${FOURTH_URI=='QNA_002' || FOURTH_URI=='QNA_003' || FOURTH_URI=='QNA_004'}">
									<%@ include file="page/left_lecture.jsp" %>
								</c:when>
								<c:when test="${FOURTH_URI=='BLG_001' || FOURTH_URI=='BLG_002' || FOURTH_URI=='BLG_003' || FOURTH_URI=='BLG_004'}">
									<%@ include file="page/left_blog.jsp" %>
								</c:when>
								<c:otherwise>
									<%@ include file="page/left_index.jsp" %>
								</c:otherwise>
							</c:choose>
						</c:when>
						<c:otherwise>
							<%@ include file="page/left_index.jsp" %>
						</c:otherwise>
					</c:choose>
				</td>
										
				<!-- contents -->
				<td id="content">
				
					<!-- navigator -->
					<c:if test="${!empty NAVIGATOR}">
						<div class="content_top">
						<c:choose>
							<c:when test="${NAVIGATOR == 'nothing'}">
								<p class="path">Navigation 정보가 존재하지 않습니다.</p>
							</c:when>
							<c:otherwise>
								<p class="path">${NAVIGATOR}</p>	
							</c:otherwise>
						</c:choose>	
						</div>
					</c:if>
		
					<!-- body -->		
					<decorator:body/>			
				</td>
			</tr>
			
		</c:otherwise>
	</c:choose>

	</table>
	<!-- //container -->
	


	<!-- footer -->
	<%@ include file="page/footer.jsp" %>
	<!-- //footer -->

</div>
<!-- //wrap -->

</body>
</html>